//
//  LineDetailDescTableViewCell.m
//  Rail
//
//  Created by hychen on 2018/3/4.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "LineDetailDescTableViewCell.h"

@interface LineDetailDescTableViewCell ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentRightConstraints;

@end
@implementation LineDetailDescTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    [self showBottomLineWithPaddingX:15 color:nil];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(BMItemModel *)model {
    _model = model;
    self.titleLabel.text = model.title;
    self.contentLabel.text = model.content;
}

- (void)setShowArrow:(BOOL)showArrow {
    _showArrow = showArrow;
    self.contentRightConstraints.constant = showArrow?30:15;
    showArrow?[self showArrowWithImage:nil]:[self hideArrow];
}

- (void)setIsPlaceholder:(BOOL)isPlaceholder {
    _isPlaceholder = isPlaceholder;
    self.contentLabel.textColor = isPlaceholder?ColorDefalutGray:kBlackColor;
}
@end
